#include<iostream>
#include<cstring>
#include<algorithm>
using namespace std;
typedef long long LL;
const int N = 3e5 + 10;
int n, q;
LL tree[N];
LL s[N];
int arr[N];
int lowbit(int x)
{
	return x & -x;
}
void add(int x, int v)
{
	for (int i = x; i < N; i += lowbit(i)) {
		tree[i] += v;
	}
}
LL get_sum(int x)
{
	LL ans = 0;
	for (int i = x; i; i -= lowbit(i)) {
		ans += tree[i];
	}
	return ans;
}

int main()
{
	cin >> n >> q;
	for (int i = 1; i <= n; i++) {
		scanf_s("%d", &arr[i]);
		s[i] = s[i - 1] + arr[i];
		add(i, arr[i]);
	}
	while (q--) {
		int op, l, r;
		scanf_s("%d%d%d", &op, &l, &r);
		if (op == 2) {
			LL ans1 = get_sum(r) - get_sum(l - 1);
			cout << "ans1==" << ans1 << endl;
			LL ans2 = s[r] - s[l - 1];
			cout << "ans2==" << ans2 << endl;
			if (ans1 == ans2) {
				cout << "Yes" << endl;
			}
			else {
				cout << "No" << endl;
			}
		}
		else {
			if (arr[l] == r)continue;
			if (r > arr[l]) {
				add(l, r - arr[l]);
			}
			else {
				add(l, arr[l] - r);
			}
		}
	}
	return 0;
}